/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 *
 * ***************************************************************************/

using Microsoft.Scripting.Ast;
using Microsoft.Scripting.Runtime;

namespace Microsoft.Scripting.Interpretation {
    public static partial class Interpreter {

        private delegate object InterpretDelegate(InterpreterState state, Expression expression);

        private static readonly InterpretDelegate[] _Interpreters = new InterpretDelegate[] {
            #region Generated Ast Interpreter

            // *** BEGIN GENERATED CODE ***
            // generated by function: gen_interpreter from: generate_tree.py

            InterpretBinaryExpression,                                  //    Add
            InterpretBinaryExpression,                                  //    AddChecked
            InterpretBinaryExpression,                                  //    And
            InterpretAndAlsoBinaryExpression,                           //    AndAlso
            InterpretUnaryExpression,                                   //    ArrayLength
            InterpretBinaryExpression,                                  //    ArrayIndex
            InterpretMethodCallExpression,                              //    Call
            InterpretBinaryExpression,                                  //    Coalesce
            InterpretConditionalExpression,                             //    Conditional
            InterpretConstantExpression,                                //    Constant
            InterpretUnaryExpression,                                   //    Convert
            InterpretUnaryExpression,                                   //    ConvertChecked
            InterpretBinaryExpression,                                  //    Divide
            InterpretBinaryExpression,                                  //    Equal
            InterpretBinaryExpression,                                  //    ExclusiveOr
            InterpretBinaryExpression,                                  //    GreaterThan
            InterpretBinaryExpression,                                  //    GreaterThanOrEqual
            InterpretInvocationExpression,                              //    Invoke
            InterpretLambdaExpression,                                  //    Lambda
            InterpretBinaryExpression,                                  //    LeftShift
            InterpretBinaryExpression,                                  //    LessThan
            InterpretBinaryExpression,                                  //    LessThanOrEqual
                                                                        // ** ListInit
            InterpretMemberExpression,                                  //    MemberAccess
                                                                        // ** MemberInit
            InterpretBinaryExpression,                                  //    Modulo
            InterpretBinaryExpression,                                  //    Multiply
            InterpretBinaryExpression,                                  //    MultiplyChecked
            InterpretUnaryExpression,                                   //    Negate
            InterpretUnaryExpression,                                   //    UnaryPlus
            InterpretUnaryExpression,                                   //    NegateChecked
            InterpretNewExpression,                                     //    New
            InterpretNewArrayExpression,                                //    NewArrayInit
            InterpretNewArrayExpression,                                //    NewArrayBounds
            InterpretUnaryExpression,                                   //    Not
            InterpretBinaryExpression,                                  //    NotEqual
            InterpretBinaryExpression,                                  //    Or
            InterpretOrElseBinaryExpression,                            //    OrElse
            InterpretParameterExpression,                               //    Parameter
            InterpretBinaryExpression,                                  //    Power
            InterpretUnaryExpression,                                   //    Quote
            InterpretBinaryExpression,                                  //    RightShift
            InterpretBinaryExpression,                                  //    Subtract
            InterpretBinaryExpression,                                  //    SubtractChecked
            InterpretUnaryExpression,                                   //    TypeAs
            InterpretTypeBinaryExpression,                              //    TypeIs
            InterpretActionExpression,                                  //    ActionExpression
            InterpretAssignmentExpression,                              //    Assign
            InterpretBlock,                                             //    Block
            InterpretBreakStatement,                                    //    BreakStatement
            InterpretLambdaExpression,                                  //    Generator
            InterpretContinueStatement,                                 //    ContinueStatement
            InterpretDeleteExpression,                                  //    Delete
            InterpretDoStatement,                                       //    DoStatement
            InterpretEmptyStatement,                                    //    EmptyStatement
            InterpretLabeledStatement,                                  //    LabeledStatement
            InterpretLocalScopeExpression,                              //    LocalScope
            InterpretLoopStatement,                                     //    LoopStatement
            InterpretUnaryExpression,                                   //    OnesComplement
            InterpretReturnStatement,                                   //    ReturnStatement
            InterpretScopeExpression,                                   //    Scope
            InterpretSwitchStatement,                                   //    SwitchStatement
            InterpretThrowStatement,                                    //    ThrowStatement
            InterpretTryStatement,                                      //    TryStatement
            InterpretVariableExpression,                                //    Variable
            InterpretYieldStatement,                                    //    YieldStatement
            InterpretExtensionExpression,                               //    Extension

            // *** END GENERATED CODE ***

            #endregion
        };
    }
}
